package com.xinqi.modules.course.clazz.mapper;

import com.xinqi.common.mybatis.data.repo.SuperMapper;
import com.xinqi.modules.course.clazz.domain.ClassGroupEntity;
import com.xinqi.modules.course.clazz.dto.req.ClassGroupSignQueryDTO;
import com.xinqi.modules.course.clazz.dto.rsp.ClassGroupResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 班级分组表数据层
 *
 * @author: system
 * @date: 2023/01/17
 */
@Mapper
public interface ClassGroupMapper extends SuperMapper<ClassGroupEntity> {
    ClassGroupEntity findParentById(@Param("id") Long id);

    ClassGroupResultDTO findByGroupStudentId(@Param("stuId") Long stuId);

    ClassGroupResultDTO findByPidAndSign(@Param("dto") ClassGroupSignQueryDTO dto);

    List<ClassGroupResultDTO> findChildrenListByPid(@Param("pid") Long pid);

    List<ClassGroupResultDTO> findListByGroupStudentIds(@Param("groupStudentIds") List<Long> groupStudentIds);
}
